/* 页面容器 */
.container {
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  min-height: 100vh;
  padding: 12px;
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
}

/* 全局重置 */
* {
  box-sizing: border-box;
}

/* 顶部工具栏 */
.topBar {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  background: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  flex-wrap: wrap;
  gap: 6px;
}

.topBar :global(.ant-tabs) {
  flex: 1;
}

.topBar :global(.ant-tabs-tab) {
  padding: 8px 16px !important;
  border-radius: 6px !important;
  margin-right: 6px !important;
  transition: all 0.3s ease !important;
}

.topBar :global(.ant-tabs-tab:hover) {
  background: rgba(102, 126, 234, 0.15) !important;
  transform: translateY(-1px) !important;
  color: #667eea !important;
}

.topBar :global(.ant-tabs-tab:hover .ant-tabs-tab-btn) {
  color: #667eea !important;
  font-weight: 600 !important;
}

.topBar :global(.ant-tabs-tab-active:hover) {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
  transform: translateY(-1px) !important;
}

.topBar :global(.ant-tabs-tab-active) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.topBar :global(.ant-tabs-tab-active .ant-tabs-tab-btn) {
  color: #fff !important;
  font-weight: 600 !important;
}

.topBar :global(.ant-tabs-tab-active:hover .ant-tabs-tab-btn) {
  color: #fff !important;
  font-weight: 600 !important;
}

.topBar :global(.ant-tabs-ink-bar) {
  display: none !important;
}

.dateButtons {
  margin-left: auto;
  display: flex;
  gap: 4px;
  align-items: center;
}

/* 通用卡片样式 */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  min-height: 200px;
}

.card > div {
  max-width: 100%;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.cardTitle {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 16px;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.cardTitle::before {
  content: '';
  display: block;
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

/* 指标卡片 */
.metricValue {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.metricLabel {
  color: #8c8c8c;
  font-size: 14px;
}

/* 统计卡片 */
.statsCard {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.statsCard:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.statsValue {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.statsLabel {
  opacity: 0.9;
  font-size: 14px;
}

/* 排名列表 */
.rankingList {
  background: linear-gradient(135deg, #f6f8fb 0%, #e9ecef 100%);
  border-radius: 8px;
  padding: 12px;
  flex: 1;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #667eea #f0f0f0;
}

.rankingList::-webkit-scrollbar {
  width: 6px;
}

.rankingList::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.rankingList::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.rankingList::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: scaleX(1.2);
}

.rankingItem {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 4px;
  background: #fff;
  border-radius: 6px;
  transition: all 0.3s ease;
  min-height: 36px;
}

.rankingItem:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rankNumber {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  margin-right: 8px;
}

.rankNumber.top {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.rankNumber.normal {
  background: #f0f0f0;
  color: #8c8c8c;
}

.rankName {
  flex: 1;
  font-size: 13px;
  color: #262626;
}

.rankValue {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 12px;
}

/* 图例项 */
.legendItem {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #fafafa;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.legendItem:hover {
  background: #f0f0f0;
}

.legendDot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 10px;
}

.legendName {
  flex: 1;
  font-size: 14px;
  color: #595959;
}

.legendPercent {
  color: #8c8c8c;
  margin-right: 12px;
  font-size: 13px;
}

.legendValue {
  font-weight: 600;
  color: #262626;
}

/* 网格布局 */
.gridRow {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.gridRow2 {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  max-width: 100%;
}

.gridRow2 > :first-child {
  flex: 2;
  min-width: 300px;
  max-width: 100%;
}

.gridRow2 > :last-child {
  flex: 1;
  min-width: 280px;
  max-width: 100%;
}

.gridRow1 {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.gridRow3 {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  max-width: 100%;
}

.gridRow3 > * {
  flex: 1;
  min-width: 280px;
  max-width: 100%;
}

/* 数据指标组 */
.metricsGroup {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.metricItem {
  flex: 1;
}

.metricItemValue {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.metricItemLabel {
  color: #8c8c8c;
  font-size: 13px;
}

/* 雷达图图例 */
.radarLegend {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
  gap: 20px;
  flex-shrink: 0;
  padding: 12px 0;
}

.radarLegendItem {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radarLegendDot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.radarLegendLabel {
  font-size: 14px;
  color: #595959;
}

.radarLegendValue {
  font-weight: 700;
  color: #262626;
  margin-left: 4px;
}

/* 按钮组 */
.buttonGroup {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ECharts 容器控制 */
.card :global(.echarts-for-react) {
  width: 100% !important;
  max-width: 100%;
  overflow: hidden;
}

.card :global(.echarts-for-react > div) {
  width: 100% !important;
  max-width: 100%;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeIn 0.5s ease-out;
}

/* 响应式 */
@media (max-width: 1400px) {
  .gridRow2 > :first-child {
    min-width: 280px;
  }
  
  .gridRow2 > :last-child {
    min-width: 240px;
  }
  
  .gridRow3 > * {
    min-width: 280px;
  }
  
  .card {
    min-height: 180px;
  }
}

@media (max-width: 1200px) {
  .gridRow2 {
    flex-direction: column;
  }
  
  .gridRow2 > :first-child,
  .gridRow2 > :last-child {
    min-width: unset;
  }
  
  .gridRow3 > * {
    flex: 1 1 calc(50% - 8px);
    min-width: 240px;
  }
  
  .topBar {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 12px;
    margin-bottom: 12px;
  }
  
  .dateButtons {
    margin-left: 0;
    justify-content: center;
    gap: 4px;
  }
  
  .card {
    min-height: 160px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 8px;
  }
  
  .gridRow2,
  .gridRow3 {
    gap: 12px;
    margin-bottom: 16px;
  }
  
  .gridRow3 > * {
    flex: 1 1 100%;
    min-width: unset;
  }
  
  .metricsGroup {
    flex-direction: column;
    gap: 12px;
  }
  
  .topBar {
    padding: 8px 10px;
    margin-bottom: 12px;
  }
  
  .metricValue {
    font-size: 28px;
  }
  
  .metricItemValue {
    font-size: 20px;
  }
  
  .card {
    min-height: 140px;
    padding: 12px;
  }
  
  .cardTitle {
    font-size: 14px;
    margin-bottom: 12px;
  }
  
  .radarLegend {
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
  }
}

